package com.ruoyi.trace.service.impl;

import java.util.List;
import java.util.UUID;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.trace.mapper.BusTraceFirmfingerMapper;
import com.ruoyi.trace.domain.BusTraceFirmfinger;
import com.ruoyi.trace.service.IBusTraceFirmfingerService;

/**
 * 溯源仪-企业指纹库Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-26
 */
@Service
public class BusTraceFirmfingerServiceImpl implements IBusTraceFirmfingerService 
{
    @Autowired
    private BusTraceFirmfingerMapper busTraceFirmfingerMapper;

    /**
     * 查询溯源仪-企业指纹库
     * 
     * @param id 溯源仪-企业指纹库主键
     * @return 溯源仪-企业指纹库
     */
    @Override
    public BusTraceFirmfinger selectBusTraceFirmfingerById(String id)
    {
        return busTraceFirmfingerMapper.selectBusTraceFirmfingerById(id);
    }

    /**
     * 查询溯源仪-企业指纹库列表
     * 
     * @param busTraceFirmfinger 溯源仪-企业指纹库
     * @return 溯源仪-企业指纹库
     */
    @Override
    public List<BusTraceFirmfinger> selectBusTraceFirmfingerList(BusTraceFirmfinger busTraceFirmfinger)
    {
        return busTraceFirmfingerMapper.selectBusTraceFirmfingerList(busTraceFirmfinger);
    }

    /**
     * 新增溯源仪-企业指纹库
     * 
     * @param busTraceFirmfinger 溯源仪-企业指纹库
     * @return 结果
     */
    @Override
    public int insertBusTraceFirmfinger(BusTraceFirmfinger busTraceFirmfinger)
    {
        busTraceFirmfinger.setId(UUID.randomUUID().toString());
        busTraceFirmfinger.setCreatetime(DateUtils.getNowDate());
        return busTraceFirmfingerMapper.insertBusTraceFirmfinger(busTraceFirmfinger);
    }

    /**
     * 修改溯源仪-企业指纹库
     * 
     * @param busTraceFirmfinger 溯源仪-企业指纹库
     * @return 结果
     */
    @Override
    public int updateBusTraceFirmfinger(BusTraceFirmfinger busTraceFirmfinger)
    {
        busTraceFirmfinger.setCreatetime(DateUtils.getNowDate());
        return busTraceFirmfingerMapper.updateBusTraceFirmfinger(busTraceFirmfinger);
    }

    /**
     * 批量删除溯源仪-企业指纹库
     * 
     * @param ids 需要删除的溯源仪-企业指纹库主键
     * @return 结果
     */
    @Override
    public int deleteBusTraceFirmfingerByIds(String[] ids)
    {
        return busTraceFirmfingerMapper.deleteBusTraceFirmfingerByIds(ids);
    }

    /**
     * 删除溯源仪-企业指纹库信息
     * 
     * @param id 溯源仪-企业指纹库主键
     * @return 结果
     */
    @Override
    public int deleteBusTraceFirmfingerById(String id)
    {
        return busTraceFirmfingerMapper.deleteBusTraceFirmfingerById(id);
    }
}
